import {v4} from 'uuid'

export function toggleTodo(todoId) {
  return {
    type: 'toggle_todo',
    payload: todoId,
  }
}

export function addTodo(text) {
  return {
    type: 'add_todo',
    payload: {
      text,
      id: v4(),
    },
  }
}